package com.example.newinfinity

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import androidx.viewbinding.ViewBinding

abstract class BaseFragment<T: ViewBinding>:Fragment() {
    lateinit var mBinding:T

    override fun onCreateView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View? {
        mBinding = initViewBinding()
        initView()
        return mBinding.root
    }

    abstract fun initViewBinding():T

    open fun initView(){}
}